import { createApp } from 'vue'
import App from './App.vue'
import HmButton from './components/HmButton.vue'
import router from './router'
import { createPinia } from 'pinia'
import persistedstate from 'pinia-plugin-persistedstate'
 // 应用对象
const application = createApp(App)
application.use(router)
// 在挂载之前去注册全局组件
application.component("HmButton",HmButton)
const pinia = createPinia() // 创建一个全局注册对象
pinia.use(persistedstate)
application.use(pinia) // 注册全局对象到app上
// 挂载到元素上
application.mount('#app')
